package com.nuoniu.sibanyun.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nuoniu.sibanyun.entity.SysAgreement;
import com.nuoniu.sibanyun.entity.dto.AgreementDto;
import com.nuoniu.sibanyun.entity.dto.AgreementSearchDto;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author baiqiang
 * @since 2020-08-31
 */
public interface ISysAgreementService extends IService<SysAgreement> {

    /**
     * 保存 协议
     * @param agreementDto
     * @return
     */
    boolean saveAgreement(AgreementDto agreementDto);

    /**
     * 最新 协议
     * @return
     */
    List<SysAgreement> last();

    /**
     * 所有 历史协议
     * @return
     */
    List<SysAgreement> historyList(AgreementSearchDto agreementSearchDto);

    /**
     * 查询协议
     * @param code 协议code
     * @return
     */
    String getAgreement(String code);

}
